package com.mmall.common;

/**
 * Created by Administrator on 2017/12/6.
 */
public enum ResponseCode {
    SUCCESS(0,"SUCCESS"),//成功
    ERROR(1,"ERROR"),//失败
    NEED_LOGIN(10,"NEED_LOGIN"),//需要登录
    ILLEGAL_ARGUMENT(2,"ILLEGAL_ARGUMENT");//参数错误

    //声明常量属性
    private  final  int code;
    private  final  String desc;

    //构造器
    ResponseCode(int code,String desc){
        this.code=code;
        this.desc=desc;
    }

    //讲code 和desc 开放出去

    public  int getCode(){
        return  code;
    }

    public  String getDesc(){
        return  desc;
    }


}
